#
# Copyright 2024 Kumo.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#    https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
###########################################################################
# below are examples, after initialization, modify it to your own.
###########################################################################
###kmcmake_example

#kmthrift --gen cpp:moveable_types,templates -out src/generated src/parquet/parquet.thrift

set(ENC_SRC)
if (PARQUET_REQUIRE_ENCRYPTION)
    # Encryption key management
    set(ENC_SRC
            parquet/encryption/encryption_internal.cc
            parquet/encryption/openssl_internal.cc
            parquet/encryption/crypto_factory.cc
            parquet/encryption/file_key_unwrapper.cc
            parquet/encryption/file_key_wrapper.cc
            parquet/encryption/file_system_key_material_store.cc
            parquet/encryption/kms_client.cc
            parquet/encryption/key_material.cc
            parquet/encryption/key_metadata.cc
            parquet/encryption/key_toolkit.cc
            parquet/encryption/key_toolkit_internal.cc
            parquet/encryption/local_wrap_kms_client.cc)
else ()
    set(ENC_SRC parquet/encryption/encryption_internal_nossl.cc)
endif ()

file(GLOB API_SRC "parquet/api/*.cc")
file(GLOB NEBULA_SRC "parquet/nebula/*.cc")
file(GLOB COMMON_SRC "parquet/*.cc")
set(PARQUET_SRC
        ${API_SRC}
        ${NEBULA_SRC}
        ${COMMON_SRC}
        ${ENC_SRC}
)
kmcmake_cc_library(
        NAMESPACE ${PROJECT_NAME}
        NAME aries
        SOURCES
        ${PARQUET_SRC}
        CXXOPTS
        ${KMCMAKE_CXX_OPTIONS}
        PLINKS
        ${KMCMAKE_DEPS_LINK}
        PUBLIC
)


###kmcmake_example